import java.util.Scanner;

public class HJ82 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        while(in.hasNext()){
            String str=in.next();
            Egyptsocre(str);
        }
    }
    public static void Egyptsocre(String str){
        String[] parts=str.split("/");
        int a=Integer.parseInt(parts[0]);//分子
        int b=Integer.parseInt(parts[1]);//分母
        StringBuilder sb=new StringBuilder();
        int c;
        while (a != 1) {
            if (b % (a - 1) == 0) {
                sb.append("1/").append(b / (a - 1)).append('+');
                a = 1;
            } else {
                c = b / a + 1; //重要点
                sb.append("1/").append(c).append('+');
                a = a * c - b;
                b = c * b;          //计算分式子
                if (b % a == 0) {
                    b = b / a;
                    a = 1;
                }
            }
        }
        sb.append("1/").append(b);
        System.out.println(sb.toString());
    }
}
